package com.member.common.enums;


import lombok.Getter;

import java.util.Objects;

@Getter
public enum VerifyStatusEnum {
    UNAUDITED(0, "未审核"),
    APPROVED( 1, "已审核"),
    FAIL( 2, "审核不通过")
    ;


    private final Integer key;
    private final String desc;

    VerifyStatusEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static VerifyStatusEnum getByKey(Integer _key) {
        for (VerifyStatusEnum item : VerifyStatusEnum.values()) {
            if (Objects.equals(item.getKey(), _key)) {
                return item;
            }
        }
        return null;
    }

}
